package xyz.yuanjilu.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import xyz.yuanjilu.dao.CarWeixinSearchDao;
import xyz.yuanjilu.entity.CarWeixinSearchEntity;
import xyz.yuanjilu.service.CarWeixinSearchService;



@Service("carWeixinSearchService")
public class CarWeixinSearchServiceImpl implements CarWeixinSearchService {
	@Autowired
	private CarWeixinSearchDao carWeixinSearchDao;
	
	@Override
	public CarWeixinSearchEntity queryObject(Long id){
		return carWeixinSearchDao.queryObject(id);
	}
	
	@Override
	public List<CarWeixinSearchEntity> queryList(Map<String, Object> map){
		return carWeixinSearchDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return carWeixinSearchDao.queryTotal(map);
	}
	@Override
	public int searchTotal(String weixinUserId){
		Map<String, Object> param=new HashMap<String, Object>();
		param.put("weixinUserId", weixinUserId);
		return carWeixinSearchDao.searchTotal(param);
	}
	
	@Override
	public void save(CarWeixinSearchEntity carWeixinSearch){
		carWeixinSearch.setCreateTime(new Date());
		carWeixinSearchDao.save(carWeixinSearch);
	}
	
	@Override
	public void update(CarWeixinSearchEntity carWeixinSearch){
		carWeixinSearchDao.update(carWeixinSearch);
	}
	
	@Override
	public void delete(Long id){
		carWeixinSearchDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		carWeixinSearchDao.deleteBatch(ids);
	}
	
}
